/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package facades.persistence;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author Alvaro
 */
@Entity
@Table(name = "movement-failpal")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "MovementFailpal.findAll", query = "SELECT m FROM MovementFailpal m")})
public class MovementFailpal implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @NotNull
    @Column(name = "idmovement-paypal")
    private Integer idmovementPaypal;
    @Size(max = 45)
    @Column(name = "operation")
    private String operation;
    @Size(max = 45)
    @Column(name = "money")
    private String money;
    // @Pattern(regexp="[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?", message="Invalid email")//if the field contains email address consider using this annotation to enforce field validation
    @Size(max = 45)
    @Column(name = "email")
    private String email;
    @Size(max = 45)
    @Column(name = "emailTO")
    private String emailTO;
    @Size(max = 45)
    @Column(name = "description")
    private String description;
    @Size(max = 45)
    @Column(name = "emailowner")
    private String emailowner;
    @JoinColumn(name = "user_iduser", referencedColumnName = "iduser")
    @ManyToOne
    private User userIduser;

    public MovementFailpal() {
    }

    public MovementFailpal(Integer idmovementPaypal) {
        this.idmovementPaypal = idmovementPaypal;
    }

    public Integer getIdmovementPaypal() {
        return idmovementPaypal;
    }

    public void setIdmovementPaypal(Integer idmovementPaypal) {
        this.idmovementPaypal = idmovementPaypal;
    }

    public String getOperation() {
        return operation;
    }

    public void setOperation(String operation) {
        this.operation = operation;
    }

    public String getMoney() {
        return money;
    }

    public void setMoney(String money) {
        this.money = money;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getEmailTO() {
        return emailTO;
    }

    public void setEmailTO(String emailTO) {
        this.emailTO = emailTO;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public String getEmailowner() {
        return emailowner;
    }

    public void setEmailowner(String emailowner) {
        this.emailowner = emailowner;
    }

    public User getUserIduser() {
        return userIduser;
    }

    public void setUserIduser(User userIduser) {
        this.userIduser = userIduser;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idmovementPaypal != null ? idmovementPaypal.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof MovementFailpal)) {
            return false;
        }
        MovementFailpal other = (MovementFailpal) object;
        if ((this.idmovementPaypal == null && other.idmovementPaypal != null) || (this.idmovementPaypal != null && !this.idmovementPaypal.equals(other.idmovementPaypal))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "facades.persistence.MovementFailpal[ idmovementPaypal=" + idmovementPaypal + " ]";
    }
    
}
